home *** CD-ROM | disk | FTP | other *** search
/ GameStar 2004 April / Gamestar_61_2004-04_dvdb.iso / DVDStar / Editace / hltp.exe / {app} / Source Code / VirtualDub / Setup / help.cpp next >
C/C++ Source or Header  |  2003-10-01  |  865b  |  37 lines

  1. #include <windows.h>
  2.  
  3. ///////////////////////////////////////////////////////////////////////////
  4. //
  5. //    help support
  6. //
  7. ///////////////////////////////////////////////////////////////////////////
  8.  
  9. static char g_szHelpPath[MAX_PATH]="VirtualD.hlp";
  10.  
  11. void HelpSetPath() {
  12.     char szPath[MAX_PATH];
  13.     char *lpFilePart;
  14.  
  15.     if (GetModuleFileName(NULL, szPath, sizeof szPath))
  16.         if (GetFullPathName(szPath, sizeof g_szHelpPath, g_szHelpPath, &lpFilePart))
  17.             strcpy(lpFilePart, "VirtualD.hlp");
  18. }
  19.  
  20. void HelpShowHelp(HWND hwnd) {
  21.     WinHelp(hwnd, g_szHelpPath, HELP_FINDER, 0);
  22. }
  23.  
  24. void HelpPopup(HWND hwnd, DWORD helpID) {
  25.     WinHelp(hwnd, g_szHelpPath, HELP_CONTEXTPOPUP, helpID);
  26. }
  27.  
  28. void HelpPopupByID(HWND hwnd, DWORD ctrlID, DWORD *lookup) {
  29.     while(lookup[0]) {
  30.         if (lookup[0] == ctrlID)
  31.             HelpPopup(hwnd, lookup[1]);
  32.  
  33.         lookup+=2;
  34.     }
  35. }
  36.  
  37.